<template>
    <div class="mod-config">
      
      <el-table :data="dataList" v-loading="dataListLoading" 
        style="width: 100%;">
        
        <el-table-column prop="courseName" header-align="center" align="center" label="课程名">
        </el-table-column>
  
        <el-table-column prop="roomName" header-align="center" align="center" label="教室">
        </el-table-column>
        <el-table-column prop="seatNumber" header-align="center" align="center" label="座位号">
        </el-table-column>
        <el-table-column prop="time" header-align="center" align="center" label="考试时间">
        </el-table-column>
        
  
       
      </el-table>
      <el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageIndex"
        :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" :total="totalPage"
        layout="total, sizes, prev, pager, next, jumper">
      </el-pagination>
      <!-- 弹窗, 新增 / 修改 -->
      
    </div>
  </template>
  
  <script>
  import { examinationarrangementApi } from '@/api/course'
  export default {
    data() {
      return {
        dataForm: {
          key: ''
        },
        dataList: [],
        pageIndex: 1,
        pageSize: 10,
        totalPage: 0,
        dataListLoading: false,
      }
    },
    mounted() {
      this.getDataList()
    },
    methods: {
      // 获取数据列表
      getDataList() {
        this.dataListLoading = true
        let params = {
          'page': this.pageIndex,
          'limit': this.pageSize,
        }
        examinationarrangementApi.getmyexam(params)
          .then(({ page }) => {
            this.dataList = page.list
            this.totalPage = page.totalCount
            this.dataListLoading = false
          })
      },
      // 每页数
      sizeChangeHandle(val) {
        this.pageSize = val
        this.pageIndex = 1
        this.getDataList()
      },
      // 当前页
      currentChangeHandle(val) {
        this.pageIndex = val
        this.getDataList()
      },
     
    }
  }
  </script>
  <style lang="scss">
  .demo-table-expand {
      font-size: 0;
    }
    .demo-table-expand label {
      width: 90px;
      color: #99a9bf;
    }
    .demo-table-expand .el-form-item {
      margin-right: 0;
      margin-bottom: 0;
      width: 50%;
    }
  </style>
  